package com.xm_jd.model.dao;

import java.util.List;

import com.xm_jd.model.entitys.user;
import com.xm_jd.utils.BaseDao;

public class ZcDao {
	BaseDao<user> bdao = new BaseDao<>(user.class);
	public int addUonHu(String name,String pwd,String phone){
		String sql="insert into tb_user values(null,null,null,null,null,?,?,?)";
		return bdao.executeUpdate(sql, new Object[]{name,pwd,phone});
	}
	//判断账号是否注册
	public List<user>Selectname(String user_name){
		String sql = "select * from tb_user where user_name=?";
		return bdao.selectAll(sql, new Object[]{user_name});
	}
	//用来修改密码
	public int updatemima(int user_pwd,String user_name){
		String sql="update tb_user set user_pwd=?where user_name=?";
		return bdao.executeUpdate(sql, new Object[]{user_pwd,user_name});
	}

}
